<!DOCTYPE html>
<html>
<head>
    <title>模具维护规程选项表</title>
    #parse("sys/header.html")
    <style>
        .ui-jqgrid {
            width: 100%;
            float: right;
        }
        .sugon_upload_btn {
            display: -webkit-inline-box;
            display: inline-block;
        }
        ::-webkit-scrollbar{
            width: 10px;
            height: 10px;
        }
        ::-webkit-scrollbar-thumb{
            border-radius: 10px;
            -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            background: #a8a5a5;
        }
        .leftHeight{
            height: 85vh;
            overflow: auto;
        }
        .workShops{
            position: absolute;
            top: 0;
            width: 100%;
            height: 25px;
            background-color: white;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>

    <div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="请输入一级或二级名称查询"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("modulemaintainoptions:import"))
                <Upload ref="uploadFile"
                        action="../modulemaintainoptions/import"
                        :format="['xlsx','xls']"
                        :before-upload="handleBeforeUpload"
                        :on-success="handleSuccess" :on-error="handleError"
                        :on-format-error="handleFormatError" class="sugon_upload_btn">
                    <i-button type="error"><i class="fa fa-hand-o-down"></i>&nbsp;导入</i-button>
                </Upload>
                #end
                #if($shiro.hasPermission("modulemaintainoptions:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainoptions:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainoptions:lose"))
                <i-button type="info" @click="lose"><i class="fa fa-plus"></i>&nbsp;失效申请</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainoptions:check"))
                <i-button type="info" @click="check"><i class="fa fa-plus"></i>&nbsp;失效审核</i-button>
                #end
                #if($shiro.hasPermission("modulemaintainoptions:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
        <Row  :gutter="16" style="margin: 8px 0px 0px 1px;">
            <i-col :xs="3" :sm="3" :md="2" :lg="3">
                <div class="leftHeight" >
                    <div class="workShops">
                        <p class="text-center" style="font-size: 15px;">模具类型</p>
                    </div>
                    <div id="storeLayer" style="margin-top: 25px">
                        <ul id="typeTree" class="ztree"></ul>
                    </div>
                </div>
            </i-col>
            <i-col :xs="21" :sm="21" :md="21" :lg="21">
                <table  id="jqGrid"></table>
            </i-col>
        </Row>
    </div>
    <Modal v-model="modal1" title="提示" @on-ok="ok" @on-cancel="cancel">
        <Radio-Group @on-change="changemsg" v-model="disabledGroup">
            <Radio :label="1">
                <span>通过</span>
            </Radio>
            <Radio :label="0">
                <span>不通过</span>
            </Radio>
        </Radio-Group>
        <i-input v-if="showmsg" type="textarea" v-model="msgyj" placeholder="请输入意见"></i-input>
    </Modal>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
        <i-form ref="formValidate" :model="moduleMaintainOptions" :rules="ruleValidate" :label-width="80">

            <Row>
                <i-col span="11">
                    <Form-item label="模具类型" prop="moduleTypeName">
                        <i-input v-model="moduleTypeNameStr" placeholder="模具类型" icon="md-arrow-dropdown-circle"  readonly
                                 @on-click="typeTree"></i-input>
                        <i-input v-module="moduleMaintainOptions.typeS" v-show="false"></i-input>
                        <i-input v-module="moduleMaintainOptions.typeB" v-show="false"></i-input>
                    </Form-item>
                </i-col>
            </Row>


            <Row>
                <i-col span="11">
                    <Form-item label="一级名称" prop="optionSubclass" v-show="optionSubclass">
                        <!--<i-input v-model="moduleMaintainOptions.optionSubclassName" icon="md-arrow-dropdown-circle"  readonly placeholder="一级名称" @on-click="getBaseOp"></i-input>-->
                        <i-input v-model="moduleMaintainOptions.optionSubclass" placeholder="一级名称"></i-input>
                    </Form-item>
                </i-col>

                <i-col span="11">
                    <Form-item label="二级名称" prop="optionName">
                        <i-input v-model="moduleMaintainOptions.optionName" placeholder="二级名称"></i-input>
                    </Form-item>
                </i-col>

            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="实施序号" prop="implPre">
                        <i-select v-model="moduleMaintainOptions.orNum" placeholder="实施序号">
                            <i-option v-for="item in orNumList" :value="item.value" :key="item.value">{{item.name}}
                            </i-option>
                        </i-select>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="是否有效" prop="isData">
                        <Radio-group v-model="moduleMaintainOptions.isEffect">
                            <Radio :label="0"><span>否</span></Radio>
                            <Radio :label="1"><span>是</span></Radio>
                        </Radio-group>
                    </Form-item>
                </i-col>
                <!--<i-col span="11">
                    <Form-item label="实施频率" prop="implPre">
                        <i-select v-model="moduleMaintainOptions.implPre" placeholder="实施频率">
                            <i-option v-for="item in implPreList" :value="item.value" :key="item.value">{{item.name}}
                            </i-option>
                        </i-select>
                    </Form-item>
                </i-col>-->
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="方法手段" prop="method">
                        <i-input v-model="moduleMaintainOptions.method" type="textarea"  placeholder="方法手段"></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11">
                    <Form-item label="检查标准" prop="inspectStandard">
                        <i-input v-model="moduleMaintainOptions.inspectStandard" type="textarea"  placeholder="检查标准"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="选项备注" prop="optionRemark">
                        <i-input v-model="moduleMaintainOptions.optionRemark" type="textarea"  placeholder="选项备注"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
    </Card>
</div>

<div id="moduleTypeLayer" style="display: none;padding:10px;">
    <ul id="moduleTypeTree" class="ztree"></ul>
</div>

<script src="${rc.contextPath}/js/module/modulemaintainoptions.js?_${date.systemTime}"></script>
</body>
</html>
